1. Field of the Invention
The present invention relates to an image pickup apparatus such as a digital still camera that receives light beams transmitting through different pupil positions of an image pickup lens by each pixel of an image pickup element and that is provided with a calculating unit that performs focus detection of a phase difference detection method by a pupil division based on a signal that is obtained by a photoelectric conversion in each pixel.
2. Description of the Related Art
As a method of detecting a focus state of an image pickup lens, an apparatus that performs focus detection of a pupil division method using a two-dimensional sensor that is provided with a microlens in each pixel of the sensor is disclosed in Japanese Patent Laid-Open No. S58-24105. In the apparatus disclosed in Japanese Patent Laid-Open No. S58-24105, a photoelectric conversion portion of each pixel that constitutes the sensor is divided into a plurality of photoelectric conversion portions and the divided photoelectric conversion portions are configured so as to receive lights of different pupil regions of the image pickup lens via the microlens.
In addition, various kinds of image pickup apparatuses capable of both performing focus detection and taking a normal image are also proposed.
In Japanese Patent Laid-Open No. 2003-244712, an image pickup apparatus that is provided with a color separation filter at some pixels including photoelectric conversion regions that convert optical signals from an object into electric signals so that both taking an image and performing focus detection are conveniently achieved is disclosed. In the image pickup apparatus disclosed in Japanese Patent Laid-Open No. 2003-244712, an image is formed based on the electric signals from the pixels where the color separation filter is formed, and the focus detection is performed based on the electric signals from pixels where the color separation filter is not formed.
In Japanese Patent No. 2959142, an image pickup apparatus that also functions as an image sensor that is provided with pixels where a microlens and a photoelectric conversion portion are relatively displaced from each other are two-dimensionally arranged is disclosed. In the image pickup apparatus disclosed in Japanese Patent No. 2959142, a focus state of an image pickup lens is detected based on an image that is generated by pixel arrays having a relative displacement direction of the microlens different from that of the photoelectric conversion portion when detecting the focus state of the image pickup lens. On the other hand, an image is generated by adding pixels that have the relative displacement direction of the microlens different from that of the photoelectric conversion portion when taking a normal image.
Conventionally, an image pickup apparatus that replaces a defective pixel with a pixel having the same color in front of the defective pixel (pre-compensation) when the pixel includes the defective pixel is proposed. In an image pickup apparatus disclosed in Japanese Patent Laid-Open No. 2003-116060, an image pickup apparatus that calculates a correction value of a defective pixel using a peripheral pixel that is selected based on an compensation direction that is selected based on an edge strength index value that is calculated by the peripheral pixel of the defective pixel is proposed.
However, when focus detection is performed by phase difference detection, there is a disadvantage that phase difference information is damaged and an error is generated in a correlation calculation and therefore exact focus detection cannot be performed by the same method.